//
//  UIImage+ResizeImage.h
//  QQ聊天布局
//
//  Created by TianGe-ios on 14-8-20.
//  Copyright (c) 2014年 TianGe-ios. All rights reserved.
//

// 版权属于原作者
// http://code4app.com (cn) http://code4app.net (en)
// 发布代码于最专业的源码分享网站: Code4App.com

#import <UIKit/UIKit.h>

@interface UIImage (ResizeImage)

- (UIImage *)imageWithCornerRadius:(CGFloat)radius;
//图片拉伸
+ (UIImage *)resizeImage:(NSString *)imageName;
+(instancetype)imageWithColor:(UIColor*)color W:(CGFloat)Width H:(CGFloat)Height;
//从相机中取出的照片进行编辑前调用此方法，调整图片方向
- (UIImage *)fixOrientation;

//在程序中如何把两张图片合成为一张图片
+ (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2;
//截图
+ (UIImage *)CroppingImageFrom:(UIView *)aView inRect:(CGRect)rect;
//// 这种是路径截图 //图片大小为路径的bound
+ (UIImage*)CroppingImage:(UIImage*)originImage fromPath:(UIBezierPath*)path;
//按尺寸缩放
+ (UIImage *)Image:(UIImage *)image byScalingToSize:(CGSize)size;

- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight toSize:(CGSize)size;
@end
